#include<vector>
using namespace std;
vector<vector<int>> ret;
vector<int> path;
void dfs(int n, int k, int pos)
{
    if (path.size() == k)
    {
        ret.push_back(path);
        return;
    }

    for (int i = pos; i <= n; i++)
    {
        path.push_back(i);
        dfs(n, k, i + 1);
        path.pop_back();
    }
}

vector<vector<int>> combine(int n, int k) {
    int pos = 1;
    dfs(n, k, pos);
    return ret;
}



int main()
{
    combine(4, 2);

	return 0;
}